import { http } from '@/utils/http/axios';

let prefix = "http://localhost";
/**
 * @categoryName 根据用户id获取用户菜单
 */
export function findPageHospSet(current, limit, searchObj) {
  return http.request({
    url: `${prefix}/admin/hosp/hospitalSet/findPageHospSet/${current}/${limit}`,
    method: 'GET',
    params:{...searchObj}
  });
}

export function deleteHospSet(id) {
 return http.request({
   url: `${prefix}/admin/hosp/hospitalSet/${id}`,
   method: 'delete',
 });
};

export function batchDeleteHospSet(idList) {
  return http.request({
    url: `${prefix}/admin/hosp/hospitalSet/batchRemove`,
    method: 'delete',
    data: idList
  });
};


export function lockHospSet(id, status) {
  return http.request({
    url: `${prefix}/admin/hosp/hospitalSet/lockHospitalSet/${id}/${status}`,
    method: 'put',
  });
};

export function saveHospSet(hospSet) {
  return http.request({
    url: `${prefix}/admin/hosp/hospitalSet/saveHospitalSet`,
    method: 'post',
    data: hospSet
  });
}

export function getHospSet(id) {
  return http.request({
    url: `${prefix}/admin/hosp/hospitalSet/getHospSet/${id}`,
    method: 'get',
  });
}
